<script>
import { h, resolveDynamicComponent } from 'vue'

function Icon(props) {
  // const Component = resolveDynamicComponent(`icon-${props.icon}`); // icon图标
  if (props.icon.startsWith('bi-', 0)) {
    return h('i', { class: `bi ${props.icon}`, style: 'font-size:17px' })
  }
  const Component = resolveDynamicComponent(`${props.icon}`)
  return h(Component)
}

export default Icon
</script>
